import time

from selenium.webdriver.common.by import By
from framework.base_page import BasePage
from framework.getyaml import getYaml

#取出yaml文件里的元素
testData = getYaml().get_yaml('baidu_page')
input_box = testData['input_box']['typevalue']
submit_btn = testData['submit_btn']['typevalue']

class HomePage(BasePage):

    def search_baidu(self,text):
        self.send_keys(input_box,text)
        self.click(submit_btn)
        time.sleep(2)

    def get_title(self):
        return self.driver.title


